|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfurny.furndb.importer.DBModelSource
public class DBModelSource
Implementation of a model source, that iterates over all furnitures in the FurnDB.
| Field Summary | |
|---|---|
private java.util.List<java.lang.Long> |
ids
|
private int |
index
|
private static java.util.logging.Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
DBModelSource()
Creates a model source, that iterates over all furnitures in the FurnDB. |
|
| Method Summary | |
|---|---|
int |
getSize()
Returns the number of elements. |
boolean |
hasNext()
Method to check if more elements are there. |
Furniture |
next()
Gets the next element. |
Furniture |
next(int offset)
This methods works like next(), but allows to skip elements. |
Furniture |
previous()
Gets the previous element. |
void |
reset()
Resets and starts at the first element. |
void |
seek(Furniture furn)
Seeks the given furniture and remembers its position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger LOGGER
private java.util.List<java.lang.Long> ids
private int index
| Constructor Detail |
|---|
public DBModelSource()
| Method Detail |
|---|
public void reset()
IModelSource
reset in interface IModelSourcepublic void seek(Furniture furn)
IModelSource
seek in interface IModelSourcefurn - The furniture to seekpublic boolean hasNext()
IModelSource
hasNext in interface IModelSourcepublic Furniture next(int offset)
IModelSource
next in interface IModelSourceoffset - The offset of elements
public Furniture next()
IModelSource
next in interface IModelSourcepublic Furniture previous()
IModelSource
previous in interface IModelSourcepublic int getSize()
IModelSource
getSize in interface IModelSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||